#include "VarConstTable.h"
#include <iostream>
using namespace std;
	
VarConstTable::VarConstTable(){
	this->table.capacity();
}
	
	int VarConstTable::getSize(){
		return table.size();
	}

	string VarConstTable::getName(int index){
		return table.at(index).getName();
	}
	int VarConstTable::getIndex(string name){
		VariableConstant toCheck;
		int index = -1;
		int j = table.size();
		for(int i = 0; i < j; i++){
			toCheck = table.at(i);
			if(toCheck.getName().compare(name) == 0){
				index = i;
				break;
			}
		}
		return index;
	}
	int VarConstTable::insertData(string name){
		VariableConstant data;int index = -1;
		if (table.empty() == false){
			index = getIndex(name);
		}
		if(index == -1){
			data.setName(name);
			table.push_back(data);
			index = table.size();
	}
		return index;
	}

	vector<int> VarConstTable::getVarList() {
		vector<int> list;
		return list;
	}